<?php

namespace api\controller;

use common\controller\VerifyController;
use common\service\TaskService;
use think\Request;
use think\Response;

class TaskController extends VerifyController
{
    /** @var TaskService $taskService */
    private TaskService $taskService;

    public function __construct()
    {
        parent::__construct();
        $this->taskService = TaskService::getInstance();
    }

    /**
     * 查询任务详情
     * @param Request $request
     * @return Response
     */
    public function getDetail(Request $request)
    {
        $res = $this->taskService->getDetail($request->param()['param']['task_id']);
        return json(success_response('ok', $res));
    }


}
